package com.heima.article.feign;

import com.heima.article.service.ApArticleService;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.search.vos.SearchArticleVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/article")
public class ArticleClient {
    @Autowired
    private ApArticleService apArticleService;

    /**
     * 保存文章
     * @param dto dto
     * @return  ResponseResult
     */
    @PostMapping("/save")
    public ResponseResult save(@RequestBody ArticleDto dto) {
        return apArticleService.save(dto);
    }
}
